//
//  UIView+Additions.m
//  CloudWeibo
//
//  Created by CLOUD on 1/15/15.
//  Copyright (c) 2015 Cloud. All rights reserved.
//

#import "UIView+Additions.h"

@implementation UIView (Additions)

- (UIViewController *) getViewController
{
    UIResponder *nextResponder = [self nextResponder];
    do {
        if ([nextResponder isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)nextResponder;
        }
        
        nextResponder = [nextResponder nextResponder];
    } while (nextResponder != nil);
    return nil;
}
@end
